<% layout("/WEB-INF/view/console/skins/skin_2/layout.html", {}) {
%>
<div class="row">
    <div class="col-md-12">
        <div class="widget-container fluid-height clearfix">
            <div class="widget-content padded clearfix">
                <div class='row'>
                    <div class='col-md-12'>
                        <form name="boProxy_form" id="boProxy_form" class='form-inline'>
                            <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='用户昵称'  >用户昵称：</label>
 <input  onkeyup='boProxyConsoleGrid.enterToQuery(event);' type='text' class='form-control' id='boProxyNickName' name='boProxyNickName' placeholder=''>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='电话号码'  >电话号码：</label>
 <input  onkeyup='boProxyConsoleGrid.enterToQuery(event);' type='text' class='form-control' id='boProxyPhone' name='boProxyPhone' placeholder=''>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='用户类型' >用户类型：</label>
 <select class="form-control" id="boProxyType" name="boProxyType">
 <option  value="">请选择...</option>
 	<option  value="1">普通用户</option>
 </select>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='是否可用' >是否可用：</label>
 <select class="form-control" id="boProxyState" name="boProxyState">
 <option  value="">请选择...</option>
 	<option  value="1">是</option>
 	<option  value="2">否</option>
 </select>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='性别' >性别：</label>
 <select class="form-control" id="boProxySex" name="boProxySex">
 <option  value="">请选择...</option>
 	<option  value="0">男</option>
 	<option  value="1">女</option>
 </select>
 </div>
 <div class='form-group col-md-3' style='margin-top: 10px;'>
 <label title='是否禁止评论' >是否禁止...：</label>
 <select class="form-control" id="boBanComment" name="boBanComment">
 <option  value="">请选择...</option>
 	<option  value="1">是</option>
 	<option  value="0">否</option>
 </select>
 </div>
 
                        </form>
                    </div>
                </div>
                <div class='row'>
                    <div align="center">
                        <button type='button' class='btn btn-default' id='boProxyQuerySearch'>查询</button>
                        <button type='button' class='btn btn-default' id='boProxyReset'>重置</button>
                    </div>
                </div>
                 <div id="boProxyToolbar" class="btn-group">
                              <button type="button" class="btn btn-default" onclick='boProxyConsoleGrid.update("boProxyId","${ctxPath}/console/bo_proxy/delete","是否禁用");'>
                                  禁用
                              </button>
                     <button type="button" class="btn btn-default" onclick='boProxyConsoleGrid.update("boProxyId","${ctxPath}/console/bo_proxy/delete","是否禁言");'>
                         禁言
                     </button>
                 </div>
                     <div class='row'>
                              <div class='col-md-12'>
                                  <table id="boProxy" data-toggle="table"
                                         data-url="${ctxPath}/console/bo_proxy/json"
                                         data-pagination="true"
                                         data-query-params="boProxyLoadParam"
                                         method="post"
                                         data-side-pagination="server"
                                         data-show-refresh="true"
                                         data-show-toggle="true"
                                         data-pagination-loop="false"
                                         data-show-columns="true"
                                         data-toolbar="#boProxyToolbar">
                                      <thead>
                                      <tr>
                                           <th data-checkbox="true"></th>
                                            <th data-field='boProxyId' data-visible='false'>ID</th>
  <th data-sortable='true' data-field='createTime' data-formatter="consoleTableDateFormat">注册时间</th>
  <th data-sortable='true' data-field='boProxyNickName'>用户昵称</th>
  <th data-sortable='true' data-field='boProxyPhone'>电话号码</th>
  <th data-sortable='true' data-field='boProxyMail'>邮箱</th>
  <th data-sortable='true' data-field='boProxyPassword'>密码</th>
  <th data-field='boProxyType' data-sortable='true' data-formatter='boProxybo_proxy_typeFormatter'>用户类型</th>
  <th data-field='boProxyState' data-sortable='true' data-formatter='boProxybo_proxy_stateFormatter'>是否可用</th>
  <th data-field='boProxySex' data-sortable='true' data-formatter='boProxybo_proxy_sexFormatter'>性别</th>
  <th data-field='boProxyHeadImage' data-sortable='true' data-formatter='boProxybo_proxy_head_imageFormatter'>头像</th>
  <th data-field='boBanComment' data-sortable='true' data-formatter='boProxybo_ban_commentFormatter'>是否禁止评论</th>
  <th data-field='boProxyId' data-formatter='boProxyTableOperate'>操作</th>
 
                                      </tr>
                                      </thead>
                                  </table>
                              </div>
                     </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
     var boProxyConsoleGrid =new consoleGrid({table_id:"boProxy"});
     boProxyConsoleGrid.init();
     function boProxyTableOperate(value){
         return "<button type='button' class='btn btn-xs btn-default command-edit' onclick='consoleOpenWindow(\"boProxy\",\"${ctxPath}/console/bo_proxy/edit?id="+value+"\",\"编辑\")'><span class='glyphicon glyphicon-pencil'></span></button> ";
     }
    function boProxyLoadParam(params){
        params.query=boProxyQueryString();
        return params;
    }
     function boProxyQueryString() {
         var objQuery = new Object();
                objQuery.boProxyNickName=$('#boProxyNickName').val()==''?null:$('#boProxyNickName').val(); 
     objQuery.boProxyPhone=$('#boProxyPhone').val()==''?null:$('#boProxyPhone').val(); 
     objQuery.boProxyType=$('#boProxyType').val()==''?null:$('#boProxyType').val();
     objQuery.boProxyState=$('#boProxyState').val()==''?null:$('#boProxyState').val(); 
     objQuery.boProxySex=$('#boProxySex').val()==''?null:$('#boProxySex').val(); 
     objQuery.boBanComment=$('#boBanComment').val()==''?null:$('#boBanComment').val(); 
 
         var queryString = JSON.stringify(objQuery);
         return queryString;
     }

     function boProxybo_proxy_typeFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '1': 
       showValue = '普通用户';
       break;
           default:
               showValue = '普通用户';
               break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }
 function boProxybo_proxy_stateFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '1': 
       showValue = '是';
       break;
       case '0':
       showValue = '否';
       break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }
 function boProxybo_proxy_sexFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '0': 
       showValue = '男';
       break;
       case '1': 
       showValue = '女';
       break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }
       function boProxybo_proxy_head_imageFormatter(value) 
       { 
         return '<a href="'+value+'" target="_blank" > <img style="height:50px;" src="'+value+'" alt="缩略图"> </a>';
       }
 function boProxybo_ban_commentFormatter(value) 
   { 
       var showValue=''; 
       switch(value+''){
       case '1': 
       showValue = '是';
       break;
       case '0': 
       showValue = '否';
       break;
       }
    if(showValue.indexOf('不')!=-1||showValue.indexOf('否')!=-1||showValue.indexOf('禁')!=-1){    
       return '<span class="label label-warning">'+showValue+'</span>';
   }else{
       return '<span class="label label-info">'+showValue+'</span>';
   }
   }

 </script>
<%} %>
 